<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>HTML 元数据</title>
    <link rel="shortcut icon" href="../../../../favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="./css/index.css">
</head>

<body>
    <div class="back">
        <a href="../../index.html">返回</a>
    </div>
    <div class="item meta">
        <h2 class="item-header">HTML 元数据</h2>
        <div class="item-meta">
            <pre><code>
    <span class="nt"> &lt;base</span> <span class="na">href=</span><span class="s">"http://dongqunren.gitee.io/ife/"</span> <span class="na">target=</span><span class="s">"_blank"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;meta</span> <span class="na">charset=</span><span class="s">"UTF-8"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;meta</span> <span class="na">name=</span><span class="s">"viewport"</span> <span class="na">content=</span><span class="s">"width=device-width, initial-scale=1.0"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;meta</span> <span class="na">http-equiv=</span><span class="s">"X-UA-Compatible"</span> <span class="na">content=</span><span class="s">"ie=edge"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;meta</span> <span class="na">name=</span><span class="s">"author"</span> <span class="na">content=</span><span class="s">"CJR"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;meta</span> <span class="na">name=</span><span class="s">"description"</span>  <span class="na">content=</span><span class="s">"A simple example"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;meta</span> <span class="na">name=</span><span class="s">"keywords"</span>  <span class="na">content=</span><span class="s">"web development"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;meta</span> <span class="na">http-equiv=</span><span class="s">"Refresh"</span> <span class="na">content=</span><span class="s">"2;URL=https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/meta#attr-content"</span><span class="nt">&gt;</span>

    <span class="nt"> &lt;link</span> <span class="na">href=</span><span class="s">"print.css"</span> <span class="na">rel=</span><span class="s">"stylesheet"</span> <span class="na">media=</span><span class="s">"print"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;link</span> <span class="na">href=</span><span class="s">"mobile.css"</span> <span class="na">rel=</span><span class="s">"stylesheet"</span> <span class="na">media=</span><span class="s">"screen and (max-width: 600px)"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;link</span> <span class="na">rel=</span><span class="s">"preload"</span> <span class="na">href=</span><span class="s">"myFont.woff2"</span> <span class="na">as=</span><span class="s">"font"</span> <span class="na">type=</span><span class="s">"font/woff2"</span> <span class="na">crossorigin=</span><span class="s">"anonymous"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;link</span> <span class="na">rel=</span><span class="s">"preload"</span> <span class="na">href=</span><span class="s">"style.css"</span> <span class="na">as=</span><span class="s">"style"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;link</span> <span class="na">rel=</span><span class="s">"preload"</span> <span class="na">href=</span><span class="s">"main.js"</span> <span class="na">as=</span><span class="s">"script"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;link</span> <span class="na">rel=</span><span class="s">"preload"</span> <span class="na">href=</span><span class="s">"sintel-short.mp4"</span> <span class="na">as=</span><span class="s">"video"</span> <span class="na">type=</span><span class="s">"video/mp4"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;link</span> <span class="na">rel=</span><span class="s">"preload"</span> <span class="na">href=</span><span class="s">"bg-image-narrow.png"</span> <span class="na">as=</span><span class="s">"image"</span> <span class="na">media=</span><span class="s">"(max-width: 600px)"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;link</span> <span class="na">rel=</span><span class="s">"preload"</span> <span class="na">href=</span><span class="s">"bg-image-wide.png"</span> <span class="na">as=</span><span class="s">"image"</span> <span class="na">media=</span><span class="s">"(min-width: 601px)"</span><span class="nt">&gt;</span>
    <span class="nt"> &lt;link</span> <span class="na">rel=</span><span class="s">"stylesheet"</span> <span class="na">href=</span><span class="s">"mystylesheet.css"</span> <span class="na">onload=</span><span class="s">"sheetLoaded()"</span> <span class="na">onerror=</span><span class="s">"sheetError()"</span><span class="nt">&gt;</span>

    <span class="nt"> &lt;style</span> <span class="na">scoped</span><span class="nt">&gt;</span><span class="nt">  p {</span> <span class="na">color:</span> <span class="s">red;</span> <span class="nt">} &lt;/style&gt;</span>
    <span class="nt"> &lt;style</span> <span class="na">media=</span><span class="s">"screen AND  (min-width:500px)"</span> <span class="na">type=</span><span class="s">"text/css"</span><span class="nt">&gt; a  {</span> <span class="na">color:</span><span class="s">Red;</span>  <span class="na">font-style:</span><span class="s">italic;</span> <span class="nt">} &lt;/style&gt;</span>
    <span class="nt"> &lt;style</span>  <span class="na">media=</span><span class="s">"print"</span><span class="nt">&gt; a{</span>  <span class="na">color:</span><span class="s">Red;</span> <span class="nt"> } &lt;/style&gt;</span>

    <span class="nt"> &lt;title</span> <span class="na">page title</span><span class="nt"> &lt;/title&gt;</span>
            </code></pre>
            <h4><strong>meta</strong> 表示那些不能由其它HTML元相关元素 (&lt;base&gt;, &lt;link&gt;, &lt;script&gt;, &lt;style&gt; 或
                &lt;title&gt;) 之一表示的任何元数据信息。</h4>
            <dl>
                <dt class="dt">charset</dt>
                <dd class="dd">
                    声明当前文档所使用的字符编码，值必须是一个符合由 IANA 所定义的字符编码首选 MIME 名称（preferred MIME name ）之一，但该声明可以被任何一个元素的 lang 特性的值覆盖。
                </dd>
                <dt class="dt">content</dt>
                <dd class="dd">
                    此属性包含http-equiv 或name 属性的值，具体取决于所使用的值。
                </dd>
                <dt class="dt">http-equiv</dt>
                <dd class="dd">
                    这个枚举属性定义了能改变服务器和用户引擎行为的编译。这个编译值使用content 来定义
                    <dl>
                        <dt>refresh</dt>
                        <dd>
                            <ul>
                                <li>如果content 只包含一个正整数,则是重新载入页面的时间间隔(秒);</li>
                                <li>如果content 包含一个正整数并且跟着一个字符串,则是重定向到指定链接的时间间隔(秒)</li>
                            </ul>
                        </dd>
                    </dl>
                </dd>
                <dt class="dt">name</dt>
                <dd class="dd">
                    该属性定义文档级元数据的名称。如果以下其中一个属性设置了itemprop, http-equiv or charset ，就不能在设置这个属性了。
                    <ul>
                        <li>application-name，定义正运行在该网页上的网络应用名称；</li>
                        <li>author，这个文档的作者名称</li>
                        <li>description，其包含页面内容的简短和精确的描述</li>
                        <li>generator, 生成页面的软件的标识符</li>
                        <li>keywords, 用逗号分隔的页面内容相关的单词</li>
                        <li>robots, 用来告诉搜索机器人哪些页面需要索引，哪些页面不需要索引。content 的参数有 all , none , index , noindex , follow ,
                            nofollow。默认是all。</li>
                    </ul>
                </dd>
            </dl>
        </div>
    </div>
</body>

</html>